package com.pptree.servlet;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CategoryController {
	public void add_Category(HttpServletRequest request, HttpServletResponse response) throws Exception{
		//request.setCharacterEncoding("utf-8");
		//response.setContentType("text/html;charset=utf-8");
		String categoryName = request.getParameter("categoryname");
		
		PrintWriter out = response.getWriter();
		out.println("<h1>添加新闻分类功能！！！</h1>");
		out.println("<h1>"+categoryName+"</h1>");
		out.flush();
		out.close();
	}
	
	
	public void delete_Category(HttpServletRequest request, HttpServletResponse response) throws Exception{
		//request.setCharacterEncoding("utf-8");
		//response.setContentType("text/html;charset=utf-8");
		PrintWriter out = response.getWriter();
		out.println("<h1>删除新闻分类功能！！！</h1>");
		out.flush();
		out.close();
	}
	
	
	
	public void update_Category(HttpServletRequest request, HttpServletResponse response) throws Exception{
		//request.setCharacterEncoding("utf-8");
		//response.setContentType("text/html;charset=utf-8");
		PrintWriter out = response.getWriter();
		out.println("<h1>更新新闻分类功能！！！</h1>");
		out.flush();
		out.close();
	}
	
	
	public void query_Category(HttpServletRequest request, HttpServletResponse response) throws Exception{
		//request.setCharacterEncoding("utf-8");
		//response.setContentType("text/html;charset=utf-8");
		PrintWriter out = response.getWriter();
		out.println("<h1>查询新闻分类列表功能！！！</h1>");
		out.flush();
		out.close();
	}
}
